

#ifndef __CE_CAMERA_H__
#define __CE_CAMERA_H__

#include <d3dx9.h>
#include <cegfx/iqf.h>
#include <cegfx/iviewport.h>
#include <cegfx/ceexport.h>
#include <cegfx/ceclipper.h>
#include <cegfx/ceprojector.h>


class CE_GFX_API ceCamera : public iBase
{
	IQF_DECLARATION;
private:
	D3DXVECTOR3	from;
	D3DXVECTOR3	at;
	D3DXVECTOR3	up;

	D3DXMATRIX	matrix;

	ceProjector*	projector;

	const iViewport* viewport;

public:
	ceCamera (const iViewport* viewport = 0);
	~ceCamera ();

	void SetViewport (const iViewport* viewport);
	const iViewport* GetViewport () const;

	void SetFrom (const D3DXVECTOR3& from);
	void MoveFrom (const D3DXVECTOR3& amount);
	const D3DXVECTOR3& GetFrom () const;

	void SetAt (const D3DXVECTOR3& at);
	void MoveAt (const D3DXVECTOR3& amount);
	const D3DXVECTOR3& GetAt () const;

	void SetUp (const D3DXVECTOR3& up);
	const D3DXVECTOR3& GetUp () const;

	virtual void Update ();
	const D3DXMATRIX& GetMatrix () const;

	ceProjector* GetProjector ();
	const ceProjector* GetProjector () const;

	void SetupClipper (ceClipper* clipper) const;
};

#endif /* ! __CE_CAMERA_H__ */ 
